Introduction

Column

Background

The purpose of this project is to explore relationships among mental and physical health issues, and predictors of anxiety and depression among college students. While mental health is sometimes hard to measure, there are standardized methods developed to help psychologists evaluate the presence and severity of certain mental health indicators. In this project, we will focus mainly on depression and anxiety disorders in relation to overall mental health.

Our physical and mental health are not distinct from each other. It is important to view health from an overall perspective, because all areas of our lives cross over into each other.

Data

The data set comes from a study based on social media’s affects on college students’ mental health (Braghieri, et. al 2022). The data includes variables with information from PHQ-9 Depression Screening Surveys and GAD-7 Anxiety Screening Surveys. Both are highly reliable and valid in medical diagnoses. Additionally, there are survey questions derived from the American College Health Association (ACHA)’s National College Health Assessment (NCHA). This data set was originally used to evaluate the validity of the NCHA by comparing the outcomes to the PHQ-9 and the GAD-7, both of which were highly correlated to the poor mental health predictors of the NCHA. There are 509 observations.

Research Questions

  • What physical health issues are related to mental health outcomes?
  • How does the mental and physical health of students who receive mental health treatment (therapy, medication) compare to students that do not?
  • Are mental and physical health problems consistent across demographics?

Column

PHQ-9

The PHQ-9 is a standardized survey used to screen and diagnose depression. Participants are asked how often they have been bothered by nine specific problems over the past two weeks and respond with one of the four answers:

  1. Not at all (+0)
  2. Several days(+1)
  3. More than half the days (+2)
  4. Nearly everyday (+3+)

The nine prompts consist of the following:

  1. Little interest or pleasure in doing things
  2. Feeling down, depressed or hopeless
  3. Trouble falling asleep, staying asleep, or sleeping too much
  4. Feeling tired or having little energy
  5. Poor appetite or overeating
  6. Feeling bad about yourself - or that you’re a failure or have let yourself or your family down
  7. Trouble concentrating on things, such as reading the newspaper or watching television
  8. Moving or speaking so slowly that other people could have noticed. Or, the opposite - being so fidgety or restless that you have been moving around a lot more than usual
  9. Thoughts that you would be better off dead or of hurting yourself in some way

Surveys are then scored and indicate levels of depression based on this scale:

  • 0-4 None-minimal
  • 5-9 Mild
  • 10-14 Moderate
  • 15-19 Moderately Severe
  • 20-27 Severe

GAD-7

Similar to the PHQ-9, the GAD-7 another is standardized survey, but it is used to screen generalized anxiety disorder. Participants are asked how often they have been bothered by seven specific problems over the past two weeks and respond with one of the four answers:

  1. Not at all (+0)
  2. Several days(+1)
  3. More than half the days (+2)
  4. Nearly everyday (+3+)

The nine prompts consist of the following:

  1. Feeling nervous, anxious or on edge
  2. Not being able to stop or control worrying
  3. Worrying too much about different things
  4. Trouble relaxing
  5. Being so restless that it is hard to sit still
  6. Becoming easily annoyed or irritable
  7. Feeling afraid as if something awful might happen

Surveys are then scored and indicate levels of anxiety based on this scale:

  • 0-4 Minimal anxiety
  • 5-9 Mild anxiety
  • 10-14 Moderate anxiety
  • 15+ Severe anxiety

NCHA

The National College Health Assessment is a semi-annual survey administered to college students by the ACHA. The current data utilizes the survey questions, but not the data collected from the ACHA.

The data includes the following prompts from the survey:

Depression Symptoms:

  • Feeling things were hopeless
  • Feeling overwhelmed by all they had to do
  • Feeling very sad
  • Feeling so depressed it was difficult to function
  • Seriously considering attempting suicide
  • Attempting suicide

Possible Responses:

  • Never
  • 1-2 times
  • 3-4 times
  • 5-6 times
  • 7-8 times
  • 9-10 times
  • 11 or more times

General Health Indicators: Reported any of the following in the past 12 months:

  • Allergy problems
  • Anorexia
  • Anxiety disorder
  • Asthma
  • Bulimia
  • Chronic fatigue syndrome
  • Depression
  • Diabetes
  • Endometriosis
  • Genital herpes
  • Genital warts/HPV
  • Hepatitis B or C
  • High blood pressure
  • High cholesterol
  • HIV infection
  • Repetitive stress injury
  • Seasonal affective disorder
  • Substance abuse problem
  • Back pain
  • Broken bone/fracture
  • Bronchitis
  • Chlamydia
  • Ear infection
  • Gonorrhea
  • Mononucleosis
  • Pelvic inflammatory disease
  • Sinus infection
  • Strep throat
  • Tuberculosis

Possible Responses:

  • Yes/No
  • NA

If diagnosed with depression:

  • Diagnosed with depression in the last school year
  • Currently in therapy for depression
  • Currently taking medication for depression

Possible Responses:

  • Yes/No
  • NA

Data & EDA

Column

Data Cleaning

Many variables that were not useful for the research questions and were removed from the data set. Most of these include timestamps from clicks in the survey and other online browser information.

Other variables were created and transformed for ease of use. For example, race was condensed into one category with information for all races as opposed to 6 different variables with two levels.

Additionally, variables were created to represent the overall depression and anxiety scores from the PHQ-9 and GAD-7 screening results.

Column


EDA

Mental Health

[1] 0.6046628

fff

summary(gad7_score) ggplot(data, aes(gad7_score)) + geom_histogram()

ggplot(data, aes(sex)) + geom_bar()

ggplot(data, aes(race)) + geom_bar()

ggplot(data, aes(phq9_interest))+ geom_bar()

Methods

Column

Column

Model

Diagnostics

References

phq-9 gad-7 ncha study

---
title: "Collegiate Mental Health "
author: "Audrey DeGregorio"
output: 
  flexdashboard::flex_dashboard:
    theme:
      version: 4
      bootswatch: bootstrap
      navbar-bg: "#674D41"
    orientation: columns
    vertical_layout: fill
    source_code: embed
---

```{r setup, include=FALSE}
pacman::p_load(flexdashboard, tidyverse, ggplot2)
library(tibble)

data <- read_csv("G:/My Drive/Fall 2025/MTH 369/Regression RStudio/Final Project/MentalHealthSurvey.csv")

data <- data |> 
  dplyr::select(c(RecordedDate, year_1, state_1, surveys, general_health, starts_with("phq9"), starts_with("gad7"), starts_with("acha_12months"), starts_with("acha_services"), acha_depression, sex, fulltime, international, starts_with("race")))

attach(data)

#creating race variable
data$race_white1 <- ifelse(data$race_white == "White - not Hispanic (includes Middle Eastern)", 1, 0)
data$race_asian1 <- ifelse(data$race_asian == "Asian or Pacific Islander", 1, 0)
data$race_black1 <- ifelse(data$race_black == "Black - not Hispanic", 1, 0)
data$race_hispanic1 <- ifelse(data$race_hispanic == "Hispanic or Latino", 1, 0)
data$race_native1 <- ifelse(data$race_native == "American Indian or Alaskan Native", 1, 0)
data$race_other1 <- ifelse(data$race_other == "Other", 1, 0)

race_count <- apply(data[,71:76], 1, function(x) sum(x, na.rm=T))

data <- data %>%
  mutate(race_count_other = case_when(race_count > 1 ~ TRUE))


data <- data %>%
  mutate(race = case_when(race_count > 1 ~ "other",
                          race_white1 == "1" ~ "white",
                          race_black1 == "1" ~ "black",
                          race_hispanic1 == "1" ~ "hispanic",
                          race_native1 == "1" ~ "native",
                          race_asian1 == "1" ~ "asian",
                          race_other1 == "1" ~ "other"))

glimpse(data)

data <- data |> 
  dplyr::select(c(RecordedDate, year_1, state_1, surveys, general_health, starts_with("phq9"), starts_with("gad7"), starts_with("acha_12months"), starts_with("acha_services"), acha_depression, sex, fulltime, international, race))


# phq9 

data <- data %>%
  mutate(phq9_interest1 = case_when(
                          phq9_interest == "Not at all" ~ 0,
                          phq9_interest == "Several days" ~ 1,
                          phq9_interest == "More than half of the days" ~ 2,
                          phq9_interest == "Nearly every day" ~ 3),
        phq9_depressed1 = case_when(
                          phq9_depressed == "Not at all" ~ 0,
                          phq9_depressed == "Several days" ~ 1,
                          phq9_depressed == "More than half of the days" ~ 2,
                          phq9_depressed == "Nearly every day" ~ 3),
        phq9_sleep1 = case_when(
                          phq9_sleep == "Not at all" ~ 0,
                          phq9_sleep == "Several days" ~ 1,
                          phq9_sleep == "More than half of the days" ~ 2,
                          phq9_sleep == "Nearly every day" ~ 3),
        phq9_tired1 = case_when(
                          phq9_tired == "Not at all" ~ 0,
                          phq9_tired == "Several days" ~ 1,
                          phq9_tired == "More than half of the days" ~ 2,
                          phq9_tired == "Nearly every day" ~ 3),
        phq9_appetite1 = case_when(
                          phq9_appetite == "Not at all" ~ 0,
                          phq9_appetite == "Several days" ~ 1,
                          phq9_appetite == "More than half of the days" ~ 2,
                          phq9_appetite == "Nearly every day" ~ 3),
        phq9_failure1 = case_when(
                          phq9_failure == "Not at all" ~ 0,
                          phq9_failure == "Several days" ~ 1,
                          phq9_failure == "More than half of the days" ~ 2,
                          phq9_failure == "Nearly every day" ~ 3),
        phq9_concentrating1 = case_when(
                          phq9_concentrating == "Not at all" ~ 0,
                          phq9_concentrating == "Several days" ~ 1,
                          phq9_concentrating == "More than half of the days" ~ 2,
                          phq9_concentrating == "Nearly every day" ~ 3),
        phq9_speed1 = case_when(
                          phq9_speed == "Not at all" ~ 0,
                          phq9_speed == "Several days" ~ 1,
                          phq9_speed == "More than half of the days" ~ 2,
                          phq9_speed == "Nearly every day" ~ 3),
        phq9_selfharm1 = case_when(
                          phq9_selfharm == "Not at all" ~ 0,
                          phq9_selfharm == "Several days" ~ 1,
                          phq9_selfharm == "More than half of the days" ~ 2,
                          phq9_selfharm == "Nearly every day" ~ 3),
        phq9_score = (phq9_interest1 + phq9_depressed1 +  phq9_sleep1 + 
                          phq9_tired1 + phq9_appetite1 + phq9_failure1 + 
                          phq9_concentrating1 + phq9_speed1 + phq9_selfharm1),
        phq9_severity = case_when(
                          phq9_score <= 4 ~ "None-minimal",
                          phq9_score > 4 & phq9_score <= 9 ~ "Mild",
                          phq9_score >= 10 & phq9_score <= 14 ~ "Moderate",
                          phq9_score >= 15 & phq9_score <= 19 ~ "Moderately Severe",
                          phq9_score >= 20 ~ "Severe")
                  
        )
        
        
# gad7

data <- data %>%
  mutate(gad7_anxious1 = case_when(
                          gad7_anxious == "Not at all" ~ 0,
                          gad7_anxious == "Several days" ~ 1,
                          gad7_anxious == "More than half of the days" ~ 2,
                          gad7_anxious == "Nearly every day" ~ 3),
        gad7_control1 = case_when(
                          gad7_control == "Not at all" ~ 0,
                          gad7_control == "Several days" ~ 1,
                          gad7_control == "More than half of the days" ~ 2,
                          gad7_control == "Nearly every day" ~ 3),
        gad7_worrying1 = case_when(
                          gad7_worrying == "Not at all" ~ 0,
                          gad7_worrying == "Several days" ~ 1,
                          gad7_worrying == "More than half of the days" ~ 2,
                          gad7_worrying == "Nearly every day" ~ 3),
        gad7_relaxing1 = case_when(
                          gad7_relaxing == "Not at all" ~ 0,
                          gad7_relaxing == "Several days" ~ 1,
                          gad7_relaxing == "More than half of the days" ~ 2,
                          gad7_relaxing == "Nearly every day" ~ 3),
        gad7_restless1 = case_when(
                          gad7_restless == "Not at all" ~ 0,
                          gad7_restless == "Several days" ~ 1,
                          gad7_restless == "More than half of the days" ~ 2,
                          gad7_restless == "Nearly every day" ~ 3),
        gad7_annoyed1 = case_when(
                          gad7_annoyed == "Not at all" ~ 0,
                          gad7_annoyed == "Several days" ~ 1,
                          gad7_annoyed == "More than half of the days" ~ 2,
                          gad7_annoyed == "Nearly every day" ~ 3),
        gad7_afraid1 = case_when(
                          gad7_afraid == "Not at all" ~ 0,
                          gad7_afraid == "Several days" ~ 1,
                          gad7_afraid == "More than half of the days" ~ 2,
                          gad7_afraid == "Nearly every day" ~ 3),
        gad7_score = (gad7_anxious1 + gad7_control1 + gad7_worrying1 + 
                          gad7_relaxing1 + gad7_restless1 + gad7_annoyed1 + 
                          gad7_afraid1),
        gad7_severity = case_when(
                          gad7_score <= 4 ~ "Minimal Anxiety",
                          gad7_score > 4 & gad7_score <= 9 ~ "Mild Anxiety",
                          gad7_score >= 10 & gad7_score <= 14 ~ "Moderate Anxiety",
                          gad7_score >= 15 ~ "Severe Anxiety"))


attach(data)
```

Introduction
===

Column { data-width=500}
-----------------------------------------------------------------------

### Background

 The purpose of this project is to explore relationships among mental and physical health issues, and predictors of anxiety and depression among college students. While mental health is sometimes hard to measure, there are standardized methods developed to help psychologists evaluate the presence and severity of certain mental health indicators. In this project, we will focus mainly on depression and anxiety disorders in relation to overall mental health. 
 
 Our physical and mental health are not distinct from each other. It is important to view health from an overall perspective, because all areas of our lives cross over into each other.
 
**Data**

  The data set comes from a study based on social media's affects on college students' mental health (Braghieri, et. al 2022). The data includes variables with information from PHQ-9 Depression Screening Surveys and GAD-7 Anxiety Screening Surveys. Both are highly reliable and valid in medical diagnoses. Additionally, there are survey questions derived from the American College Health Association (ACHA)'s National College Health Assessment (NCHA). This data set was originally used to evaluate the validity of the NCHA by comparing the outcomes to the PHQ-9 and the GAD-7, both of which were highly correlated to the poor mental health predictors of the NCHA. There are 509 observations.
 

### Research Questions
 
 - What physical health issues are related to mental health outcomes?
 - How does the mental and physical health of students who receive mental health treatment (therapy, medication) compare to students that do not?
 - Are mental and physical health problems consistent across demographics?
 
  

 
Column {.tabset data-width=500}
-----------------------------------------------------------------------




### PHQ-9

The [PHQ-9](https://www.hiv.uw.edu/page/mental-health-screening/phq-9) is a standardized survey used to screen and diagnose depression. Participants are asked how often they have been bothered by nine specific problems over the past two weeks and respond with one of the four answers:

1. Not at all (+0)
2. Several days(+1)
3. More than half the days (+2)
4. Nearly everyday (+3+)

The nine prompts consist of the following: 

  1. Little interest or pleasure in doing things 
  2. Feeling down, depressed or hopeless 
  3. Trouble falling asleep, staying asleep, or sleeping too much 
  4. Feeling tired or having little energy 
  5. Poor appetite or overeating 
  6. Feeling bad about yourself - or that you’re a failure or have let yourself or your family down 
  7. Trouble concentrating on things, such as reading the newspaper or watching television 
  8. Moving or speaking so slowly that other people could have noticed. Or, the opposite - being so fidgety or restless that you have been moving around a lot more than usual 
  9. Thoughts that you would be better off dead or of hurting yourself in some way
  
  
Surveys are then scored and indicate levels of depression based on this scale:

- **0-4** None-minimal
- **5-9** Mild
- **10-14** Moderate
- **15-19** Moderately Severe
- **20-27** Severe




### GAD-7

Similar to the PHQ-9, the [GAD-7](https://www.hiv.uw.edu/page/mental-health-screening/gad-7) another is standardized survey, but it is used to screen generalized anxiety disorder. Participants are asked how often they have been bothered by seven specific problems over the past two weeks and respond with one of the four answers:

1. Not at all (+0)
2. Several days(+1)
3. More than half the days (+2)
4. Nearly everyday (+3+)

The nine prompts consist of the following: 

  1. Feeling nervous, anxious or on edge 
  2. Not being able to stop or control worrying
  3. Worrying too much about different things
  4. Trouble relaxing 
  5. Being so restless that it is hard to sit still
  6. Becoming easily annoyed or irritable
  7. Feeling afraid as if something awful might happen
  
  
Surveys are then scored and indicate levels of anxiety based on this scale:

- **0-4** Minimal anxiety
- **5-9** Mild anxiety
- **10-14** Moderate anxiety
- **15+** Severe anxiety


### NCHA

The [National College Health Assessment](https://www.acha.org/ncha/data-results/survey-results/all-ncha-survey-reports/original-ncha-survey-reports/) is a semi-annual survey administered to college students by the ACHA. The current data utilizes the survey questions, but not the data collected from the ACHA. 

The data includes the following prompts from the survey:

**Depression Symptoms:**

- Feeling things were hopeless
- Feeling overwhelmed by all they had to do
- Feeling very sad
- Feeling so depressed it was difficult to
function
- Seriously considering attempting suicide
- Attempting suicide

*Possible Responses:*

- Never
- 1-2 times 
- 3-4 times
- 5-6 times
- 7-8 times
- 9-10 times
- 11 or more times


**General Health Indicators:**
Reported any of the following in the past 12 months:

- Allergy problems
- Anorexia
- Anxiety disorder
- Asthma
- Bulimia
- Chronic fatigue syndrome
- Depression
- Diabetes
- Endometriosis
- Genital herpes
- Genital warts/HPV
- Hepatitis B or C
- High blood pressure
- High cholesterol
- HIV infection
- Repetitive stress injury
- Seasonal affective disorder
- Substance abuse problem
- Back pain
- Broken bone/fracture
- Bronchitis
- Chlamydia
- Ear infection
- Gonorrhea
- Mononucleosis
- Pelvic inflammatory disease
- Sinus infection
- Strep throat
- Tuberculosis

*Possible Responses:*

 - Yes/No
 - NA
 
 
If diagnosed with depression:

 - Diagnosed with depression in the last school year
 - Currently in therapy for depression
 - Currently taking medication for depression

*Possible Responses:*

- Yes/No
- NA


Data & EDA
===


Column { .tabset data-width=300}
---

### Data Cleaning

Many variables that were not useful for the research questions and were removed from the data set. Most of these include timestamps from clicks in the survey and other online browser information.

Other variables were created and transformed for ease of use. For example, race was condensed into one category with information for all races as opposed to 6 different variables with two levels. 

Additionally, variables were created to represent the overall depression and anxiety scores from the PHQ-9 and GAD-7 screening results.

Column 

---

## EDA { .tabset}

### Mental Health
<div style="height:500px; overflow-y: auto; padding-right: 10px;">
```{r phq9 gad7 cor}
ggplot(data, aes(phq9_score, gad7_score)) +
  geom_point() +
  labs(title = "PHQ-9 and GAD-7 Correlation", x = "PHQ-9 Score", y = "GAD-7 Score") +
  geom_smooth(method = "lm", se = FALSE, col = "maroon")
cor(phq9_score, gad7_score)^2

```




```{r phq9 bar}
data$phq9_severity <- factor(data$phq9_severity, 
                  levels = c("None-minimal", "Mild", "Moderate", "Moderately Severe", "Severe"))
ggplot(data,aes(phq9_severity)) +
  geom_bar(fill = "maroon") +
  labs(title = "PHQ-9 Results", x = "Severity")
```


<div style="height:500px; overflow-y: auto; padding-right: 10px;">

```{r gad7 bar}
data$gad7_severity <- factor(data$gad7_severity, 
                  levels = c("Minimal Anxiety", "Mild Anxiety", "Moderate Anxiety", "Severe Anxiety"))

ggplot(data,aes(gad7_severity)) +
  geom_bar(fill = "maroon") +
  labs(title = "GAD-7 Results", x = "Severity")
```

### fff
<div style="height:500px; overflow-y: auto; padding-right: 10px;">


summary(gad7_score)
ggplot(data, aes(gad7_score)) +
  geom_histogram()



ggplot(data, aes(sex)) +
  geom_bar()

ggplot(data, aes(race)) +
  geom_bar()

ggplot(data, aes(phq9_interest))+
         geom_bar()






Methods
===

Column {.tabset data-width=700}
---



Column {.tabset data-width=300}
---


### Model


### Diagnostics






References
===

phq-9 
gad-7
ncha
study